In an isolated switching power supply with a transformer having primary and secondary windings, a voltage at one side can be sampled from the other side of the transformer based on the coupling properties between the windings of the transformer. For example, in a primary-side feedback switching power supply, an output voltage at a secondary side can be detected through a primary winding or an auxiliary winding at a primary side of a transformer, and the detected voltage signal may be fed back and controlled by a controller at the primary side. In a secondary-side feedback switching power supply, an output voltage at the primary side can be detected through a secondary winding or an auxiliary winding at the secondary side of a transformer, and the detected voltage signal can be used to achieve overvoltage protection by a controller at the secondary side. In another case, a voltage at the primary side can be detected through a secondary winding of the transformer, and the detected voltage signal can be controlled by the controller at the secondary side.